import axios from 'axios'

axios.defaults.baseURL = 'http://localhost:8181'

//登录api
export const requestLogin = params => { return axios.post(`/api/v1/login`, params).then(res => res.data) }

//招商银行城市管理API
export const getCmbCityList = params => { return axios.post(`/api/v1/cmbCity/list`, params).then(res => res.data)};

export const addCmbCity = params => {  return axios.post(`/api/v1/cmbCity/add`, params).then(res => res.data)}

export const delCmbCity = params => {  return axios.get(`/api/v1/cmbCity/del`, { params: params }).then(res => res.data)}

export const editCmbCity = params => {  return axios.post(`/api/v1/cmbCity/edit`, params).then(res => res.data)}

export const getSysConfigList = params => { return axios.post(`/api/v1/sysConfig/list`, params).then(res => res.data)};

export const delSysConfig = params => { return axios.get(`/api/v1/sysConfig/del`, { params: params }).then(res => res.data) };

export const editSysConfig = params => { return axios.post(`/api/v1/sysConfig/edit`, params).then(res => res.data) };

export const addSysConfig = params => { return axios.post(`/api/v1/sysConfig/add`, params).then(res => res.data) };

export const getParamConfigList = params => { return axios.post(`/api/v1/paraConfig/list`).then(res => res.data)  };

export const getParamConfigPageList = params => { return axios.post(`/api/v1/paraConfig/pageList`, params).then(res => res.data) };

export const delParamConfig = params => { return axios.get('/api/v1/paramConfig/del',{params: params}).then(res => res.data)};